{% extends "admin/base.html" %}

{% block css %}
{% endblock %}

{% block content %}
    <script type="text/javascript">
        var primary_menu = "menu_0";
        var sub_menu = "menu_0_0";
    </script>

    <div class="col-md-12">
        <h3 class="company-name">{{name}}</h3>
        <div class="panel panel-primary">
            <div class="panel-heading">
                <div class="panel-title"><h3>园区基本信息</h3></div>
                <div class="panel-options">
                    <a href="javascript:history.back();" class="bg"><button type="button" class="btn btn-info">返回</button></a>
                </div>
            </div>
            <div class="panel-body with-table">
                    <table class="input_in table-detail">
                        <tr>
                            <td width="20%">
                                <p>化工园名称</p>
                            </td>
                            <td>
                                <p>{{ park.name }}</p>
                            </td>
                        </tr>
                        <tr>
                            <td>所在省市</td>
                            <td>
                                <p>{{ park.address }}</p>
                            </td>
                        </tr>
                        <tr>
                            <td>园区级别</td>
                            <td>
                                <p class="text-muted">{{ park.rank }}</p>
                            </td>
                        </tr>
                        <tr>
                            <td>建立时间</td>
                            <td>
                                <p class="text-muted">{{ park.create_time }}</p>
                            </td>
                        </tr>
                        <tr>
                            <td>占地面积</td>
                            <td>
                                <p class="text-muted">{{ park.area }}</p>
                            </td>
                        </tr>
                        <tr>
                            <td>主要产业类型</td>
                            <td>
                                <p class="text-muted">{{ park.production_type }}</p>
                            </td>
                        </tr>
                        <tr>
                            <td>园区简介</td>
                            <td>
                                <p class="text-muted">{{ park.info }}</p>
                            </td>
                        </tr>
                    </table>
            </div>
        </div>
    </div>

    <div class="col-md-12">
            <div class="panel-body">
                <div data-dojo-type="dijit.layout.BorderContainer" design="headline" gutters="false" style="position:relative;width:100%; height:400px;">
                    <div id="map" dojotype="dijit.layout.ContentPane" region="center" style="overflow:hidden; height:400px;">
                        <div id="osmCopy" style="position:absolute; color:black;font-weight:bold;right:10px; bottom:10px; z-Index:999;"></div>
                    </div>
                </div>
            </div>
        </div>
{% endblock %}
{% block js %}

    <script language="javascript">
        var geo_points = '{{ basic.geo_points }}';
        var geo_center_point = '{{ basic.geo_center_point }}';

        if(geo_center_point){
            geo_center_point = eval(geo_center_point);
            $('#geo_x').val(geo_center_point[0]);
            $('#geo_y').val(geo_center_point[1]);
        }
    </script>

    <script type="text/javascript" src="/static/js/map.action.companyInfo.js"></script>

    <script language="javascript">

        function getNextElement (field) {
            var form = field.form;
            for (var e = 0; e < form.elements.length; e++)
                if (field == form.elements[e])
                    break;

            return form.elements[++e % form.elements.length];
        }
        function tabOnEnter (field, evt) {
            var keyCode = document.layers ? evt.which : document.all ?
                    evt.keyCode : evt.keyCode;
            if (field.value.length == 1){
                getNextElement(field).focus();
                return false;
            }
        }
    </script>
{% endblock %}